1. Field of the Invention
The present invention relates to database backup environments. More particularly, the present invention relates to systems and methods which backup databases by compressing data using dynamic compression ratios. More particularly, the present invention relates to compression ratios dynamically determined by a feedback loop.
2. Description of Related Art
Database data is routinely duplicated and stored in another storage medium, such as a file or another database, in order to protect the data saved in the original database. The process of duplicating data is commonly known as a backup. A backup typically compresses data of the original database in order to conserve space in the other storage medium where the data is stored. Because data is compressed before being transferred to the other storage medium for storage, a backup consumes time and resources of a backup system—reducing system performance.
Traditional backup software uses data gathered before a backup in order to perform the compression. For example, traditional backup software, such as “SQL Safe” marketed by BBS Technologies Inc., has certain compression ratios set by a user of the software prior to the onset of a backup. A compression ratio is the ratio between the uncompressed size of a block of data and the compressed size of said data. Compression ratios are set in order to compress the data during the backup such that the resulting backup file is significantly smaller than the data in the target object, or original database. Alternatively, traditional backup software can run on the computer system prior to the onset of a backup. The software evaluates the power and speed of any central processing unit (CPU) of the computer, the time taken to write a sample backup file, and/or the time taken to read the database, in order to determine a compression ratio. In both cases, the compression ratio is not changed during the backup, i.e., the backup software uses a static compression ratio during the backup.
FIG. 1 shows a block diagram of a prior art software backup program. The prior art program reads database pages/blocks and optionally compresses the data using a compression algorithm. The data, usually compressed, is then written to the IO subsystem of either the database server shown in FIG. 1 or another server. A problem associated with the prior art software backup program is that a static compression algorithm/ratio is used throughout the backup. Static compression algorithms/ratios can overload backup components, resulting in bottlenecks on various system components that inhibit backup performance. Even high loads on the components can create bottlenecks that decrease backup performance. These bottlenecks resulting from static compression ratios indicate that any fixed-user compression setting or sample run made before a backup begins can never guarantee that a backup occurs in the lowest elapsed time and at the highest compression ratio possible. Thus, there is a need in the prior art to minimize the use of static compression ratios during the backup.
Another problem associated with traditional backup software is that the load between components on a database server varies significantly each and every second. The central processing unit(s) of the database can work very hard for one second, and the next second the IO subsystem of the database can become overloaded. Variances in the composition of the data being backed up can also cause a variance on the load of the database server as it tries to compress blocks of data. The composition of some blocks of data allow for effortless compression to very high compression ratios whilst other data blocks in the same database contain somewhat incompressible data and can sharply raise the processing “load” on a computer. Thus, there is a need to manage the variances in loads of the components of a database server in order to optimize data compression and backup.
There are prior art backup systems that disclose backup environments that dynamically adjust (i.e. during a backup) a compression ratio(s) according to values of various system parameters, such as available tape space, backup window time, size of a data set, previous compression ratios, compression rates, transfer rates, transfer sizes, and CPU usage. Although such prior art systems can dynamically change compression ratios, there is a need to better control the changes in the value of the compression ratio itself so that a backup performs at the best speed and most efficient compression possible.
It is an object to backup data in the shortest period of time with the highest compression of data possible during that time.
It is another object to optimize both the speed and compression during backup of a database or transaction log to the IO subsystem of a computer.
It is another object to backup data in the fastest time and at the highest possible compression ratio despite variances in load occurring on the components of a computer or database server during said backup interval.
It is another object to backup a database in the fastest time and at the highest compression ratio possible despite variances in the composition of the data subject to backup.
It is another object to evaluate the speed at which data compression occurs on central processing unit(s) versus the speed at which compressed data is written to the IO subsystem and/or is read from the database.
It is still another object to monitor a percentage of a CPU consumed on a server during the backup.
It is another object to vary the compression level according to the percentage of a CPU consumed.
It is another object to compress data using a dynamic compression algorithm/ratio throughout the backup.
It is another object to monitor the backup environment and/or progress of a backup so as to determine a most effective compression algorithm/ratio at each discrete instant during the backup.
It is another object to obtain optimal balance between compression time and available system resources.
It is another object to damp and/or bias against tendencies of a backup system.
The objects of the disclosed system and method are not limited to those listed above. These and other objects are made apparent by the specification, claims, and drawings.